package com.framework.web.sys.controller;

import com.framework.web.common.mappings.SysUrlMappings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 公共的页面跳转
 * @author fusf
 *
 */
@Controller
public class CommonController  {
	//日志
	protected Logger logger = LoggerFactory.getLogger(this.getClass());

	/**
	 *
	 *统一的页面跳转
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = SysUrlMappings.SYS_COMMON_INDEX, method = RequestMethod.GET)
	public ModelAndView index(String url) throws Exception {

		// 页面跳转
		logger.info("jump to page "+ url);
		ModelAndView modelAndView = new ModelAndView(url.trim());
		return modelAndView;
	}


}
